import computed from "./computed.js";
import ref from "./ref.js";
import reactive from "./reactive.js";
import watch from "./watch.js";
const state = ref({ a: 1, b: 2, c: { d: { e: { f: 3 } } } });
const state2 = reactive({ a: 1, b: 2, c: { d: { e: { f: 3 } } } });

const state3 = computed({
  get: () => {
    const res = state.value + state2.a;
    return res;
  },
});

watch(
  state,
  (newVal, oldVal) => {
    console.log(`watch has Trigger!!!!`);
    console.log(`newVal is`, newVal);
    console.log(`oldVal is`, oldVal);
  },
  {
    deep: true,
  }
);

// state2.a = 2;
// state2.b = 3;
state.value.c.d.e.f = 4;
